Skip to content

Fix docstring example: session.begin_transaction() needs to be awaited #807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 3, 2022

Conversation

112358fn
Copy link
Contributor

Found this error in the docstring while working with the async module of the driver. When the session is an instance of AsyncSession the method begin_transaction() is async and needs to be awaited. The example in the docstring was missing the await keyword and running it as that returns AttributeError: __aenter__

@robsdedude
Copy link
Member

Hello and thanks for taking the time to fix the docstring and opening this PR. Before I can even review it, I must ask you to sign our CLA (Contributor License Agreement).

@112358fn
Copy link
Contributor Author

Sure! I just did it, sorry for the delay. It is a great module by the way: very clean and well documented! I just felt that a little detail like that fix can save someone some time. Thank you for taking the time to review it.

@robsdedude
Copy link
Member

Perfect. Thanks for the kind words and taking the time to contribute to our library! 🙌

Copy link
Member

@robsdedude robsdedude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📚 ⏳

@robsdedude robsdedude merged commit 7190636 into neo4j:5.0 Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants